<?php

class ItemPhotoModel extends DBModel
{
	protected $_table = '{{item_photo}}';
	protected $_id = 'rid';
	
	public function getListByItemID($itemid, $select = '*')
	{
		$where['select'] = $select;
		$where['condition'] = 'itemid = :itemid';
		$params = array(':itemid' => $itemid);
		return $this->findAll($where, $params);
	}
	
	public function delByItemID($itemid)
	{
		return $this->delete('itemid = :itemid', array(':itemid' => $itemid));
	}
}